chore(deps): update dependency wemake-python-styleguide to v1 #56
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.19.2->1.4.0Release Notes
wemake-services/wemake-python-styleguide (wemake-python-styleguide)
v1.4.0Compare Source
Features
__init__.pyfiles that consist only of imports, #3486--max-conditionsoption, #3493--known-enum-basesoption to support custom enum-like base classes, #3513Misc
.. plugincodesfor violation rendering, #1318v1.3.0Compare Source
Features
WPS110:spam,ham,tmp,temp,arrBugfixes
WPS243to use number of statements infinallybodyinstead of a number of lines, #3458
v1.2.0Compare Source
Due to PEP-695, it's now allowed
to use
[]in decorators only forpython3.12+.Features
WPS243: forbids complexfinallybodies, #3458WPS478: forbids using non strict slice operations, #1011WPS479: forbids using multiline fstrings, #3405WPS480: forbids using comments inside formatted string, #3404Bugfixes
WPS604andWPS614rules from thenoqa.py, #3420WPS115false-positive onStrEnum,IntEnum,IntFlagattributes, #3381WPS432, now it ignores magic numbers inLiteral, #3397WPS466for generic type specificationsMyClassDecorator[T], #3417WPS212to ignore nested classes and functionswhen counting
returnstatements, #3413WPS349highlighting, #3437v1.1.0Compare Source
Command line utility
This version introduces
wpsCLI tool.wps explain <code>command can be used to access WPSviolation docs (same as on website) but without any internet access.
Features
WPS476: forbids to useawaitexpressions inforloops, #1600WPS477: forbidsTypeVarTupleafter aTypeVarwith a default, #3265Bugfixes
WPS115false-positive onEnumattributes, #3238WPS312, #3239WPS432, now it shows literal num, #1402WPS226, now it points to the first string literal occurrence, #3267WPS605false-positive on@staticmethod, #3292_SELFname not to triggerWPS117, #3310WPS221being too strict with f-strings, #3350v1.0.0Compare Source
Ruff
This release introduces the new main concept:
ruffcompatibility.Now
WPSis the onlyflake8plugin that is installed.Other things are done by
ruff.It is faster, it has autofixing, there are lots of rules.
Basically, this way
WPSjust gain lotsof new rule and plugins almost for free.
It is now stricter than ever!
WPSnow officially supportsALL
ruffexisting rules. This means that there are no conflictsbetween two linters.
To run
WPSandrufftogether, use:You can copy our configuration from
pyproject.toml(forruff) andsetup.cfg(forflake8).Black
WPScan now also be used withblackwith default configuration.However, we recommend using
ruff formatinstead.Speed
WPSgot a lot faster! Because:flake8pluginsruffRunning
0.19.2(previous version) on https://github.com/dry-python/returnsThe same on
1.0.0:Which is 2.4x times faster!
Integrations
We also significantly improved all the integrations!
WPScan now be used as first-classpre-commithook with:Our GitHub Action also got a lot of new options and fixes.
Removals
python3.9supportnitpicksupportflake8-commas,flake8-isort,flake8-debugger,flake8-string-format,flake8-quotes,flake8-comprehensions,flake8-bugbear,flake8-docstrings,flake8-eradicate,flake8-bandit,flake8-broken-line,flake8-rst-docstrings,pep8-namingsupport, use
ruff formatandruff checkinsteaddarglintsupport, because it is unmaintainedWPS113, because is covered bypylintlinterWPS119, because is covered bypylintlinterWPS125, because it is covered byrufflinterWPS302, because it is covered byruffformatterWPS304, because it is covered byruffformatterWPS305, because it is covered byruffformatterWPS306, because it is covered byruffformatterWPS309, because it is covered byruffformatterWPS310, because it is covered byruffformatterWPS313, because it is covered byruffformatterWPS315, because it is covered byruffformatterWPS316, because it is covered byrufflinterWPS317, because it is covered byruffformatterWPS318, because it is covered byruffformatterWPS319, because it is covered byruffformatterWPS320, because it is covered byruffformatterWPS323, because it is covered byruffformatterWPS326, because it is covered byrufflinterWPS329, because it is covered byrufflinterWPS331, because it is covered byrufflinterWPS333, because is covered bypylintlinterWPS337, because it is covered byruffformatterWPS340, because it is covered byruffformatterWPS341, because it is covered byruffformatterWPS343, because it is covered byruffformatterWPS348, because it conflicts withruffformatterWPS351, because it is covered byrufflinterWPS352, because it is covered byruffformatterWPS355, because it is covered byruffformatterWPS360, because it is covered byruffformatterWPS361, because it is covered byruffformatterWPS415, because is covered byrufflinterWPS417, because is covered byrufflinterWPS419, because is covered byrufflinterWPS423, because is covered byrufflinterWPS424, because is covered byrufflinterWPS425, because is covered byrufflinterWPS428, because is covered byrufflinterWPS433, because is covered bypylintlinterWPS434, because is covered bypylintlinterWPS436, because is covered bypylintlinterWPS437, because is covered byrufflinterWPS440, becauseit was buggy and is covered by
mypy, #3209WPS442, becauseit was buggy and is covered by
mypy, #3209WPS450, because is covered bypylintlinterWPS452, because is covered byrufflinterWPS454, because is covered byrufflinterWPS456, because is covered byrufflinterWPS465, because|is now heavily used by typingWPS467, because is covered bypylintlinterWPS502, because is covered byrufflinterWPS503, because is covered byrufflinterWPS507, because is covered bypylintlinterWPS508, because is covered byrufflinterWPS510, because is covered bypylintlinterWPS514, because is covered bypylintlinterWPS528, because is covered bypylintlinterWPS525, because is covered byrufflinterWPS526, because is covered byrufflinterWPS521, because is covered byrufflinterWPS609, because is covered bypylintlinter--i-control-codesetting,if you want to disable some violations, just use
# noqaor--ignorewith code that you want to exclude, there's no need
to create one more way of disabling some specific violations
Features
python3.13supportassertstatements forWPS520, #3112:=) in comprehesions, #3121passincasebodies, #2642WPS600, when creating anEnum, #2506WPS441inassertstatements, #2543self,cls, andmcsas argumentsfor
WPS211complexity check anymore, #2394_) with exactly 3 digits after it inWPS303, #3120in
@dataclasses forWPS601, #1926@dataclasses inWPS230, #2448in
@overloaddefinitions forWPS211, #1957hasattrbuiltin function, #2228is notandnot inas negated conditions inWPS504, #2617if/elif/elseto be negated inWPS504, #2617lambdaassigns to special attributes, #1733ifs andelifs, #2241casepattens inmatch, #3206matchsubjects, #3201casestatements, #3202exceptwith too many exceptionsPEP695type paramsraise SystemExit, usesys.exitinstead, #1786match ...subjects, #3217--allowed-module-metadataand--forbidden-module-metadataconfiguration options for
WPS410, #3060--allowed-domain-namesalso affectWPS11to allow custom short variable names, #2554
wemake-python-styleguideas apre-commithook, #2588cwd:parameter to specifywhere your configuration file is, #2474
fail_workflow:parameter to not failthe workflow even if the check did find any issues
filter_mode:parameter to specifyhow ReviewDog will filter found violations,
see https://github.com/reviewdog/reviewdog#filter-mode #2239
Bugfixes
WPS217to allow simple calls infstrings, #3150WPS217not to raise on emptyfstrings,because
ruff checkhandles that now for usOverusedStringViolationnot to include'...'stringastorpackage in favour ofast.unparseWPS210to not count nested local variables in nested scopes #3108IterableUnpackingViolationwith generic types andTypeVarTupleWPS469detecting incorrect names of raised exceptions, #3109WPS221to ignore PEP695'sTypeAliasfrom line complexity checksWPS474to only count import collisions in the same context, #2962WPS612to count defaults in function definitions, #2478WPS322with multiline strings detectioncase:statementsWPS314not detectingmatchstatementsmatch+casedoes not increase cognitive complexityMisc
ondividoc for legacy codebasesruffastnodes from code:ast.Num,ast.Bytes,ast.Str,ast.NamedConstant, etcConfiguration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.